package com.iengoo.edu;

/**
 * @author zpym
 * @CopyRight (C) http://www.iengoo.com
 * @brief 猫的食物：鱼
 * @email 122162005@qq.com
 * @date 2019-01-22 09:56
 */
public class Fish extends Food {
    public Fish() {
    }

    public Fish(String name, String type) {
        super(name, type);  // super 表示父类的构造方法，要跟父类构造方法参数对应
    }

    public void swimming() {
        System.out.println("我是" + this.getName() + "我可以游泳");
    }

    @Override
    public String getType() {
        return "一条狗";
    }
}
